-- GENERATED SPELL FOR [Carrion Devourer] --


function spell0_8605(pUnit, Event) --@Maggot Goo,Self--
pUnit:FullCastSpellOnTarget(17197,pUnit)
pUnit:RegisterEvent('Sorts_8605', 6000, 1)
end

function spell1_8605(pUnit, Event) --@Maggot Slime,n/a--
pUnit:FullCastSpellOnTarget(16449,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8605', 20262, 1)
end

function Sorts_8605(pUnit, Event)
local choix_sorts_8605 = math.random(0, 1)
if choix_sorts_8605 == 0 then
pUnit:RegisterEvent('spell0_8605', 1, 1)
end
if choix_sorts_8605 == 1 then
pUnit:RegisterEvent('spell1_8605', 1, 1)
end
end

function mob8605_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8605', math.random(1500, 3000), 1)
end

function mob8605_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8605_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8605_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8605, 1, 'mob8605_Action')
RegisterUnitEvent(8605, 2, 'mob8605_Leave')
RegisterUnitEvent(8605, 3, 'mob8605_Kill')
RegisterUnitEvent(8605, 4, 'mob8605_Die')
